package cn.kbyue.security.utils;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 常用自定义异常
 * @author xl
 * @date 2020/4/11
 */
@Getter
@AllArgsConstructor
public enum BizExceptionEnum {
    /**
     * security 未授权
     */
    Unauthorized(401, "未登录, 无法访问"),
    Forbidden(403, "未授权，暂无法访问"),
    Internal_Error(500, "服务器内部错误"),
    /**
     * 自定义异常 -- 非法操作
     */
    NOT_ALLOWED_OPERATION(10001, "非法操作");

    private final Integer code;
    private final String message;

}
